package com.jsmile.cloud.accountcenter.api.feign;

import javax.validation.Valid;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.jsmile.cloud.accountcenter.api.constants.AccountConstants;
import com.jsmile.cloud.accountcenter.api.req.ReqMemberDetial;
import com.jsmile.cloud.accountcenter.api.req.shop.ReqShopDelete;
import com.jsmile.cloud.accountcenter.api.req.shop.ReqShopQuery;
import com.jsmile.cloud.accountcenter.api.res.ResShop;
import com.jsmile.mall.api.JSmileResult;
import com.jsmile.mall.api.to.JsmilePage;

@FeignClient(value = AccountConstants.APPLICATION_NAME, contextId = "shop")
public interface ShopServiceApi {

    // TODO 获取店铺信息
    @RequestMapping(value = "/feign/shop/getShop", method = RequestMethod.POST)
    JSmileResult<ResShop> getShop(@RequestBody @Valid ReqShopDelete reqShopDelete);

    // TODO 获取店铺列表
    @RequestMapping(value = "/feign/shop/getShopPageList", method = RequestMethod.POST)
    JSmileResult<JsmilePage<ResShop>> getShopPageList(@RequestBody @Valid ReqShopQuery reqShopQuery);

    // TODO 根据用户id获取店铺信息
    @RequestMapping(value = "/feign/shop/getShopByUserId", method = RequestMethod.POST)
    JSmileResult<ResShop> getShopByUserId(@RequestBody @Valid ReqMemberDetial reqMemberDetial);

}
